using GO_Test_1.Components;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace GO_Test_1 {

	public class Game1 : Game {

		private GraphicsDeviceManager graphics;
		private SpriteBatch spriteBatch;
		public static readonly Rectangle gameBounds;

		static Game1() {
			gameBounds = new Rectangle(0, 0, 800, 600);
		}

		public Game1() {
			graphics = new GraphicsDeviceManager(this);
			Content.RootDirectory = "Content";
			graphics.PreferredBackBufferWidth = gameBounds.Width;
			graphics.PreferredBackBufferHeight = gameBounds.Height;
		}

		protected override void LoadContent() {
			spriteBatch = new SpriteBatch(GraphicsDevice);
			LevelManager.LoadLevel(Content, 1);
		}

		protected override void Update(GameTime gameTime) {
			BehaviorManager.Update(gameTime);
			base.Update(gameTime);
		}

		protected override void Draw(GameTime gameTime) {
			GraphicsDevice.Clear(Color.Black);
			spriteBatch.Begin();
			RenderingEngine.Draw(spriteBatch);
			spriteBatch.End();
			base.Draw(gameTime);
		}

	}

}